<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>jvm view remastered</title>
</head>
<body>
<div th:object="${jvmView}">
    <table border="1">
        <tr>
            <td colspan="4">JVM health check:</td>
        </tr>
        <tr>
            <td>ContextClassLoader:</td>
            <td colspan="2" th:object="${jvmView.contextClassLoader}"></td>
            <td>查询当前的ClassLoader，用于判断是否有重启现象</td>
        </tr>
        <tr>
            <td>startTime:</td>
            <td colspan="2" th:object="${jvmView.startTime}"></td>
            <td>启动时间，用户判断是否自动重启，这个重启是进程级别的。</td>
        </tr>
        <tr>
            <td colspan="4">Memory Check: "PS Old Gen" 和 "Metaspace" 最为重要</td>
        </tr>
        <tr>
            <td>序号</td>
            <td>最大容量</td>
            <td>当前使用</td>
            <td>最大百分比</td>
        </tr>ss
        <tr th:each="mpb:${jvmView.mpbs}">
            <td th:text="${mpb.name}"></td>
            <td th:text="${mpb.usage.max}': 'abb(${mpb.usage.max}', '1024 * 1024 * 100)M"></td>
            <td th:text="${mpb.usage.used}': 'abb(${mpb.usage.used}', '1024 * 1024 * 100)M"></td>
            <td th:text="abb(${mpb.usage.used},${mpb.usage.max})'%'"></td>
        </tr>

        <tr>
            <td colspan="4">GC Check: PS MarkSweep is the best zero(PS MarkSweep最好是0)</td>
        </tr>
        <tr>
            <td>名称</td>
            <td>GC 内存区域</td>
            <td>GC次数</td>
            <td>GC时间</td>
        </tr>
        <tr th:each="gcb:${jvmView.gcbs}">
            <td th:text="${gcb.name}"></td>
            <td th:text="getString(${gcb.memoryPoolNames})"></td>
            <td th:text="${gcb.CollectionCount}"></td>
            <td th:text="${gcb.CollectionTime}ns (abb(${gcb.CollectionTime}, 1000 * 100))"></td>
        </tr>
    </table>
</div>
</body>
</html>